<?php
namespace app\admin\validate;

use think\Validate;

class User extends Validate
{
    protected $rule = [
//        'mobile'         => 'require|unique:user|number|length:11',
        'u_email'            => 'require|unique:user',
        'u_password'         => 'confirm:confirm_password',
        'confirm_password'   => 'confirm:u_password',
    ];

    protected $message = [
//        'mobile.require'           => '请输入手机号',
//        'mobile.unique'            => '手机号已存在',
//        'mobile.number'            => '手机号格式错误',
//        'mobile.length'            => '手机号长度错误',
//        'u_email.email'            => '邮箱格式错误',
        'u_email.email'              => '账号不能为空',
        'u_email.unique'             => '账号已存在',
        'u_password.confirm'         => '两次输入密码不一致',
        'confirm_password.confirm'   => '两次输入密码不一致',


    ];
}